import { Component, PropsWithChildren } from 'react'
import { View, Text, Image, Button } from '@tarojs/components'
import { AtList, AtListItem, AtForm, AtInput } from "taro-ui"
import './index.scss'
import user from '../../picture/user.png'
import Taro from '@tarojs/taro'

export default class Index extends Component<PropsWithChildren> {
  value1: string
  value2: string
  maxLength: number
  constructor(props) {
    super(props)
    this.value1 = ''
    this.value2 = ''
  }
  componentWillMount() { }

  componentDidMount() { }

  componentWillUnmount() { }

  componentDidShow() { }

  componentDidHide() { }
  onClick() {
    Taro.switchTab({
      url: '/pages/my/index'
    })
  }
  handleChange() {

  }
  render() {
    return (
      <View className='index'>
        <View className='nav-bar-box'>
          <View className='status-bar'></View>
          <View className='title-bar'>
            <Text className='tit'>宏烨经纪人</Text>
          </View>
        </View>
        <View className='Login'>
          <View className='user'>
            <Image src={user} />
            <View className='tit'>用心服务 创造未来</View>
          </View>
          <View className='form'>
              <AtInput className='tel'
                required
                name='value1'
                // border={false}
                type='phone'
                placeholder='请输入手机号'
                value={this.value1}
                onChange={this.handleChange.bind(this)}
              />
              <AtInput className='yzm'
                required
                name='value2'
                type='text'
                maxLength={4}
                placeholder='请输入验证码'
                value={this.value2}
                onChange={this.handleChange.bind(this)}
              >
                <View className='send'>发送验证码</View>
              </AtInput>
            <Button className='loginbtn'>立即登录</Button>
          </View>
        </View>
      </View >
    )
  }
}
